﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SiteList.aspx.cs" Inherits="Manage_Cms_SiteList" %>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <!--#include file="../js/html_head.inc"-->
    <link rel="stylesheet" href="../Themes/<%=ManageHelper.GetTheme()%>/style.css" type="text/css" />
    <title>服务器列表</title>
</head>
<body>
<%=ManageHelper.PageSucMsg()!=""?"<div class='msg_succeed'>"+ManageHelper.PageSucMsg()+"</div>":""%>
<%=ManageHelper.PageErrMsg()!=""?"<div class='msg_failed'>"+ManageHelper.PageErrMsg()+"</div>":""%>
<table width="95%" align="center">
        <tr>
            <td align="right">
                <table cellpadding="0" cellspacing="0" width="100%">
                    <tr>
                        <td>
                            <input type="submit" name="AddGroup" value="添加站点" onclick="ymPrompt.win('SiteItem.aspx',440,400,'添加站点',null,null,null,true);"
                                id="AddGroup" class="button" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
<div class="column">
    <div class="columntitle">管理站点</div>
	<table cellspacing="0" cellpadding="0" rules="all" Align="center" border="0" id="MyDataGrid" style="border-width:0px;width:100%;border-collapse:collapse;">
	<tr class="summary-title" style="height:25px;">
		<td align="center">站点名称</td>
		<td>站点别名</td>
		<td>站点网站</td>
		<td align="center">是否启用</td>
		<td>服务器IP</td>
		<td>排序</td>
		<td  align="center">操作</td>
	</tr>
	<%
        foreach (KeRui.Model.CmsSite model in listCmsSite)
    {
	%>
	<tr class="tdbg" onmouseover="this.className='tdbg-dark';" onmouseout="this.className='tdbg';" style="height:25px;">
		<td  align="center"><b><%=model.SiteName %></b></td>
		<!--<td><%=model.SiteAlias%></td>-->
		<td><%=model.SiteKey%></td>
		<td><%=model.SiteUrl%></td>
		<td align="center"><%=model.IsUsing.ToString().Replace("1", "启用").Replace("0", "<font style='color:red'>禁用</font>")%></td>
		<td><%=model.ServerIP%></td>
        <td ><%=model.OrderID %></td>
		<td align="center" >
		  <a href="javascript:ymPrompt.win('RoleItem.aspx?id=<%=model.SiteID %>&actname=修改',440,500,'修改模板',null,null,null,true);" >管理</a>
		  <span>|</span>
		  <a href="javascript:ymPrompt.win('siteitem.aspx?id=<%=model.SiteID %>&act=edit',440,400,'修改模板',null,null,null,true);" >修改</a> 
		  <span>|
		  <%if (ManageHelper.CheckAdminHavePower("system_sitedel"))
            {%>
		  <a href='siteitem.aspx?id=<%=model.SiteID %>&act=del' onClick="javascript:return confirm('此操作将会删除服务器“<%=model.SiteName %>”，确认吗？');">删除</a>
		  <%}
        else
            { %>
		    <s>删除</s>
		  <%} %>
		  </span>
		 </td>
	</tr>
	<%
	} 
	%>
    </table>	
</div>
<%
    if(SiteName!="")
    {
%>
<script type="text/javascript" language="javascript">
function Display()
{
    ymPrompt.win('RoleItem.aspx?id=<%=modelCmsSite.SiteID %>&actname=添加',440,500,'修改模板',null,null,null,true);
}
Display();
</script>
<%
    }
%>
</body>
</html>
